package org.jetlinks.community.device.enums;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.hswebframework.web.dict.Dict;
import org.hswebframework.web.dict.EnumDict;

@Slf4j
@Getter
@AllArgsConstructor
@Dict("classification")
@JsonDeserialize(contentUsing = EnumDict.EnumDictJSONDeserializer.class)
public enum Classification implements EnumDict<Integer> {

    AUTOMATIC( 0, "自动采集"),
    MANUAL(1, "手动填报");

    private final Integer code;
    private final String value;


    @Override
    public Integer getValue() {
        return this.code;
    }

    @Override
    public String getText() {
        return this.value;
    }
}